1. Technical Field
The present invention relates generally to an improved distributed data processing system and in particular to a method and apparatus for providing plug and play services in a distributed data processing system. Still more particularly, the present invention provides a method and apparatus for scaling proxy servers providing plug and play services in a distributed data processing system.
2. Description of Related Art
Plug and play in personal computers was brought about by a cooperative multiple-vendor effort to improve the personal computer platform by delivering a zero configuration peripheral connectivity. Such a system was first introduced in Microsoft Windows 95, which was offered by Microsoft Corporation. Universal plug and play (UPnP) is intended to bring zero-configuration features from plug and play to networks. Universal plug and play reuses existing protocols in technology, such as Internet Protocol (IP). The standards used in universal plug and play are open Internet standards.
UPnP includes a service discovery mechanism to support spontaneous networking. In other words, devices and software services dynamically avail themselves to the network. UPnP network topologies include three categories of network entities. These three categories are services, proxies, and clients. Services may be hardware or software based services. Proxies work like a registry of services that are available. Clients include any network entity, which requires a service. The protocol used in UPnP to perform service look up and discovery is Simple Service Discovery Protocol (SSDP).
SSDP services announce themselves to the network via ssdp:alive messages. The ssdp:alive message defines the service type, unique service name (i.e. uuid), location(s) of the service via universal resource identifiers (URIs), and caching information (i.e. max-age).
SSDP proxies monitor ssdp:alive messages on the reserved SSDP multicast channel. Multicast is a mechanism for sending a single message to multiple recipients. Universal plug and play involves the use of multicast domain name system (DNS) requests. These types of requests allow a machine to see requests for its name and respond to the requests. Multicast DNS is used when a DNS server is unavailable.
As services notify the network that they exist, the proxy maintains a cache of the registered services. This cache is also referred to as a xe2x80x9cnetwork cachexe2x80x9d. The network cache persists the data transmitted by the ssdp:alive messages broadcast by each service. Proxies employ a cache replacement policy such that service entries are deleted when the time interval between subsequent ssdp:alive transmissions exceeds that indicated by the services advertised maximum age. A network cache can be regarded as a dynamic database supporting the service listing facility conveyed by the SSDP proxy.
SSDP proxies are also SSDP service in that they must first announce their presence on the network and attempt to discover an existing proxy. If a proxy is detected, a proxy election algorithm is applied to resolve the new primary proxy. According to the current SSDP specification, there can be only one primary proxy on any UPnP network.
UPnP clients must discover the primary proxy in order to use it. Clients use the same mechanism to discover a primary proxy as they use to discover any other service. Clients use the primary proxy to discover the set of services it requires. Clients leverage SSDP search and subscribe messages to locate and monitor services.
SSDP leverages the Internet group management protocol for IP multicast support. Internet Group Management Protocol (IGMP) messages are not forwarded to multiple multicast routers, thus bounding UPnP networks to a single subnet. More information on IGMP may be found in rfc 2236 at http://www.ietf.org maintained by the Internet Engineering Task Force (IETF). UPnP networks support only a single primary proxy per subnet. All other viable proxies behave as xe2x80x9caproxiesxe2x80x9d sitting idle on the network until such time, as the primary proxy is no longer available. A primary proxy can become unavailable due to network failures, being overrun with client requests, hardware failure, or when the proxy sends an ssdp:byebye message. Proxy unavailable is detected like any other service""s unavailability when it no longer issues ssdp:alive messages. When the primary proxy expires the UPnP network reconfigures itself by electing a new proxy from the set of idle xe2x80x9caproxiesxe2x80x9d. The aproxies challenge one another until a dominant proxy is resolved as the primary proxy. Proxies which failed to satisfy all challenges resume the role of aproxy.
A newly elected primary proxy must determine the set of services that are available on the network, by issuing a ssdp:notproxyaware SEARCH message. After receiving the ssdp:notproxyaware SEARCH message, services respond with ssdp:alive messages, such that the new primary proxy may initialize its cache. Clients reissue ssdp:discovery and subscribe requests to the newly elected proxy in order to monitor relevant services, all clients must then discover the proxy in which to access services. The process as described in the SSDP specification has several drawbacks: (1) clients are indefinitely delayed from discovering proxied services; (2) services must reestablish network presence, due to loss of caching information; (3) proxies make inefficient use of network resources by challenging one another; (4) service expiration goes undetected in the absence of a primary proxy; and (5) UPnP networks do not scale to support multiple SSDP proxies. Further, failure of the primary proxy is visible to all resources on the network (i.e. clients, services, and aproxies).
Therefore, it would be advantageous to have an improved method and apparatus for providing proxy services in a distributed data processing system.
The present invention provides a method in a distributed data processing system for providing proxy services. Requests are processed by a primary proxy, using a shared memory in the distributed data processing system. A challenge from a secondary proxy to the primary proxy is detected. A determination is made as to whether the secondary proxy has priority over the primary proxy. This may be determined using priorities assigned to the proxies. Responsive to determining whether the secondary proxy has priority over the primary proxy, a priority of the secondary proxy is stored. Responsive to the secondary proxy having priority over the primary proxy, the secondary proxy to is allowed access the shared memory. Further, the secondary proxy is then allowed to multi-cast a message to clients indicating the secondary proxy""s location. This message indicates that the secondary proxy is now the primary proxy.
In the event, that the secondary proxy fails to win the challenge, requests are cached by the secondary proxy. These are requests that are processed by the primary proxy. These processed requests are stored by the primary proxy in the shared memory The secondary proxy monitors to see if the secondary proxy is selected to become the primary proxy. Responsive to the secondary proxy being selected to become the primary proxy, the new primary proxy compares cached requests with processed requests in the shared memory to identified unprocessed requests. Requests identified as being unprocessed requests are serviced.